The primary difference in tree-visitor is that the visit-node function returns several items: a new-node, a new-state, and a stop flag. tree-visitor中的主要差别在于,visit-node函数返回多个项目:一个new-node、一个new-state和一个stop标记。
This allows the thread to stop waiting if no messages have arrived, and check a flag to see if we should keep waiting for messages. 这将允许线程在没有消息到达的情况下停止等待,查看标志,看看是否应该坚持等待消息。
Finally, make sure the Stop If True flag is turned on. 最后,确保打开了为真则停止标识。